﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 装饰模式
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Person person = new Person("小菜");

            Console.WriteLine("\n第一种装扮：");

            Sneakers sneakers = new Sneakers();
            BigTrouser bigTrouser = new BigTrouser();
            TShirts shirts = new TShirts();

            sneakers.Decorate(person);
            bigTrouser.Decorate(sneakers);
            shirts.Decorate(bigTrouser);
            shirts.Show();

            Console.WriteLine("\n第二种装扮：");

            LeatherShoes leatherShoes = new LeatherShoes();
            Tie tie = new Tie();
            Suit suit = new Suit();

            leatherShoes.Decorate(person);
            tie.Decorate(leatherShoes);
            suit.Decorate(tie);
            suit.Show();

            Console.WriteLine("\n第三种装扮：");
            Sneakers sneakers1 = new Sneakers();
            LeatherShoes leatherShoes1 = new LeatherShoes();
            BigTrouser bigTrouser1 = new BigTrouser();
            Tie tie1 = new Tie();

            sneakers1.Decorate(person);
            leatherShoes1.Decorate(sneakers1);
            bigTrouser1.Decorate(leatherShoes1);
            tie1.Decorate(bigTrouser1);
            tie1.Show();

            Console.Read();
        }
    }
}
